﻿using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Xioa_UI.Convert;

public class CardHeaderCornerRadiusConverter : IValueConverter
{
    public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        var cornerstone = (CornerRadius)(value);

        return new CornerRadius(cornerstone.TopLeft, cornerstone.TopRight, 0, 0);
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        var corneradius = (CornerRadius)value;

        return new CornerRadius(corneradius.TopLeft);
    }
}